Spline1[p1_,p2_]:=Function[{t},p1 (1-t)+p2 t];
Spline2[p1_,p2_,p3_]:=Function[{t},p1 (((1-t))^2)+2p2(1-t)t+p3 (t^2)];
Spline3[p1_,p2_,p3_,p4_]:=Function[{t},p1 (((1-t))^3)+3 p2(((1-t))^2)t+3p3(1-t)(t^2)+p4 (t^3)];
Arc3[p1_,p2_,p3_,full_]:=Module[{C0,a,b,c,p,R,θ1,θ2,θ3,x,y},
C0={x,y}/.Solve[{(p2[[2]]-p1[[2]])(p1[[2]]+p2[[2]]-2y)==(p2[[1]]-p1[[1]])(2x-p1[[1]]-p2[[1]]),(p2[[2]]-p3[[2]])(p3[[2]]+p2[[2]]-2y)==(p2[[1]]-p3[[1]])(2x-p3[[1]]-p2[[1]])},{x,y}][[1]];
a=Norm[p1-p2];b=Norm[p2-p3];c=Norm[p1-p3];
p=(1/2)(a+b+c);R=((a b c)/(4(Sqrt[p(p-a)(p-b)(p-c)])));
{θ1,θ2,θ3}=ArcTan@@@(#-C0&/@{p1,p2,p3});
{θ1,θ3}=MinMax[{θ1,θ3}];

Circle[C0,R,Which[full,{0,2π},θ1<θ2<θ3,{θ1,θ3},True,{θ1+2π,θ3}]]
];

si=Graphics[{Black,Rectangle[{-1,-1},{1,1}],White,Rectangle[{-.6,-.6},{.6,.6}]},ImageSize->18];
ci=Graphics[{Black,Disk[]},ImageSize->18];
stl0=Directive[Red,Thickness[.01]];
stl1=Directive[Gray,Thickness[.001]];
stl2=Directive[Gray,Thickness[.002]];
stlb=Directive[Black,Thickness[.004]];

Дуги окружностей

PicArcs[{p1_,p2_,p3_},{p4_,p5_},second_]:=Graphics[{Opacity[.36],Thickness[.0005],Arc3[p1,p2,p3,True],If[second,Arc3[p3,p4,p5,True],],Opacity[1],Thickness[.005],Arc3[p1,p2,p3,False],If[second,Arc3[p3,p4,p5,False],]},Axes->None,ImageSize->Scaled[.8],Epilog->{},PlotRange->{{-1,1},.5{-1,1}}];

Manipulate[
PicArcs[{p1,p2,p3},{p4,p5},second],
{{second,False,"+1"},Checkbox},{{p1,{-.6,-.1}},Locator,Appearance->ci},{{p2,{0,0.2}},Locator,Appearance->ci},{{p3,{.6,-.1}},Locator,Appearance->ci},{{p4,{0.35,.2}},Locator,Appearance->If[second,ci,""]},{{p5,{0.1,-.1}},Locator,Appearance->If[second,ci,""]},
Paneled->False,SaveDefinitions->True
]

Квадратичные кривые Безьé

Pic2[{p1_,p2_,p3_},τ_,stage_:1]:=Module[{p21,p22,p31},
p21=Spline1[p1,p2][τ];p22=Spline1[p2,p3][τ];p31=Spline2[p1,p2,p3][τ];
ParametricPlot[{
Spline1[p1,p2][t],Spline1[p2,p3][t],Spline1[p21,p22][t],
Spline2[p1,p2,p3][τ t]
},
{t,0,1},PlotRange->{{-1,1},.5{-1,1}},
PlotStyle->{
Which[stage==0||stage≥5,Opacity[0],stage==1,stl2,True,stl1],
Which[stage==0||stage≥5,Opacity[0],stage==1,stl2,True,stl1],
Which[stage≤1||stage≥5,Opacity[0],stage==2,stl2,True,stl1],
Which[stage≥4,stl0,True,Opacity[0]]
},
Axes->None,ImageSize->Scaled[.8],
Epilog->{Gray,If[5>stage>0,{Disk[p21,.01],Disk[p22,.01]}],If[5>stage>2,{Red,Disk[p31,.015]}]}
]
];

Manipulate[
Pic2[{p1,p2,p3},τ,stage],
{{τ,0},0,1},{{stage,1},0,5,1},
{{p1,{-.6,-.2}},Locator,Appearance->ci},
{{p2,{0,0.2}},Locator,Appearance->ci},
{{p3,{.6,-.2}},Locator,Appearance->ci},
Paneled->False,SaveDefinitions->True]

Кубические кривые Безьé

Pic3[{p1_,p2_,p3_,p4_},τ_,stage_:5,trace_:True,Pen_:False]:=Module[{p12,p23,p34,p123,p234},
p12=p1(1-τ)+p2 τ;p23=p2(1-τ)+p3 τ;p34=p3(1-τ)+p4 τ;
p123=p12(1-τ)+p23 τ;p234=p23(1-τ)+p34 τ;
ParametricPlot[{
p1(1-t)+p2 t,p2(1-t)+p3 t,p3(1-t)+p4 t,
p12(1-t)+p23 t,p23(1-t)+p34 t,
p123(1-t)+p234 t,
Spline3[p1,p2,p3,p4][If[Pen,1,τ] t],
p1(1-t)+p2 t,p3(1-t)+p4 t
},{t,0,1},PlotRange->{{-1,1},.5{-1,1}},
PlotStyle->{
Which[Pen,Opacity[0],stage>1,stl1,stage>0,stl2,True,Opacity[0]],
Which[Pen,Opacity[0],stage>1,stl1,stage>0,stl2,True,Opacity[0]],
Which[Pen,Opacity[0],stage>1,stl1,stage>0,stl2,True,Opacity[0]],
Which[Pen,Opacity[0],stage>3,stl1,stage>1,stl2,True,Opacity[0]],
Which[Pen,Opacity[0],stage>3,stl1,stage>1,stl2,True,Opacity[0]],
Which[Pen,Opacity[0],stage>3,stl2,True,Opacity[0]],
Which[Pen||trace,stl0,True,Opacity[0]],
If[Pen,stlb,Opacity[0]],If[Pen,stlb,Opacity[0]]
}
,Axes->None,ImageSize->Scaled[.8],
Prolog->{stl1,
If[(!Pen)&&(stage>0),{
Disk[p12,.01],Disk[p23,.01],Disk[p34,.01]
}],
If[(!Pen)&&stage>2,{
Disk[p123,.01],Disk[p234,.01]
}]
},
Epilog->{If[stage>4||trace||Pen,{Red,Disk[Spline3[p1,p2,p3,p4][τ],.015]}]
}]];

Manipulate[
Pic3[{p1,p2,p3,p4},τ,stage,trace,Pen],
{{τ,0},0,1},{{stage,1},0,5,1},
{{trace,False},Checkbox},{{Pen,False,"Pen Tool"},Checkbox},
{{p1,{-.4,-0.4}},Locator,Appearance->If[Pen,si,ci]},
{{p2,{-.4,0}},Locator,Appearance->ci},
{{p3,{0,.4}},Locator,Appearance->ci},
{{p4,{.4,.4}},Locator,Appearance->If[Pen,si,ci]},
Paneled->False,SaveDefinitions->True]